home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun: Strategy Games 1 / rerun-strategygamesI.d64 / video poker (.txt) < prev   
Commodore BASIC  |  2022-09-20  |  7KB  |  264 lines

  1. 2 printchr$(147)"would you like instructions (y/n)?
  2. 4 [161] a$: [139] a$[179][177] "y" [175] a$[179][177]"n" [167] 4
  3. 6 [139] a$[178]"n" [167] 62
  4. 8 [153]"instructions on screen or printer (s/p)?
  5. 10 get b$: if b$<> "s" and b$<>"p" then 10
  6. 12 if b$="s"then  d=3
  7. 14 if b$="p" then d=4
  8. 16 open d,d
  9. 18 print#d,"
  10. 20 [152]d,"video poker by tony brantner
  11. 22 print#d,"
  12. 24 [152]d,"run it right: c-64; joystick
  13. 26 print#d,"
  14. 28 [152]d,"video poker is a game for one player
  15. 30 print#d,"with a joystick in port 2.
  16. 32 [152]d,"
  17. 34 print#d,"raise and lower bets with the up-down
  18. 36 [152]d,"joystick motion. betting can only go to
  19. 38 print#d,"$50 per hand, and cannot exceed your
  20. 40 [152]d,"balance. place bets and select the hold
  21. 42 print#d,"cards with the firebutton. to release a
  22. 44 [152]d,"hold card, press the firebutton again.
  23. 46 print#d,"when you choose  your hold cards, move
  24. 48 [152]d,"to the draw box and press the fire-
  25. 50 print#d,"button. the cards you don't select will
  26. 52 [152]d,"be discarded and replaced. the computer
  27. 54 print#d,"automatically calculates your score and
  28. 56 [152]d,"winnings. when you are ready to quit,
  29. 58 print#d,"enter a bet of $0.
  30. 60 [152]d,"":[160]d
  31. 62 [153]"press any key to begin the program..."
  32. 64 [161] e$:[139] e$[178]"" [167] 64
  33. 66 [156]
  34. 68 [143] video poker v1.0 - t. brantner
  35. 70 [151]52,56:[151]56,56:[156]
  36. 72 [134]dc(51),ca(4),ch(15),hv(5),hs(4),po$(9),po(9)
  37. 74 [129]a[178]0[164]51:dc(a)[178]a:[130]:z[178][187]([171]ti)
  38. 76 v[178]53248:sc[178]1024:sp[178]sc[170]1016:s1[178]54272
  39. 78 s2[178]s1[170]7:j2[178]56320:sx[178]50:sy[178]66:mb[178]50
  40. 80 cv$[178]"23456789[jqka":cs$[178]"\]^_"
  41. 82 [129]a[178]1[164]38:sp$[178]sp$[170][199](32):[130]
  42. 84 [129]a[178]s1[164]s1[170]24:[151]a,0:[130]
  43. 86 [151]s1[170]24,15:[141]382
  44. 88 bt[178]1:bl[178]100
  45. 90 [143]---main
  46. 92 [129]a[178]0[164]4:ca(a)[178]0:[130]
  47. 94 [141]252
  48. 96 [141]190:[139]bt[178]0[167]118
  49. 98 [141]168
  50. 100 cy[178]1:[141]354:cy[178]6:[141]354
  51. 102 [141]252:[141]180:cp[178]0:[141]144
  52. 104 [141]218:[141]168:[141]144
  53. 106 [141]266:bl[178]bl[170]po(pv)[172]bt
  54. 108 cy[178]1:a$[178]po$(pv):cc[178]0
  55. 110 cx[178]20[171][195](a$):[141]366
  56. 112 tm[178]70:[141]346
  57. 114 [139]bl[167]92
  58. 116 [143]---end game
  59. 118 cy[178]10:cx[178]7:cc[178]0:a$[178]"play again?"
  60. 120 [141]366:cx[178]31:cc[178]1:xp[178]1
  61. 122 js[178][194](j2)
  62. 124 [139](js[175]2)[178]0[175]xp[178]1[167]xp[178]2
  63. 126 [139](js[175]1)[178]0[175]xp[178]2[167]xp[178]1
  64. 128 a$[178][202]("yn",xp,1):[141]366
  65. 130 tm[178]10:[141]346
  66. 132 [141]360:[153][200](sp$,2)
  67. 134 tm[178]10:[141]346:[139](js[175]16)[167]122
  68. 136 [141]354
  69. 138 [139]xp[178]1[167][141]326:[137]88
  70. 140 [151]832,0:[158]832
  71. 142 [143]---draw cards
  72. 144 [129]xp[178]0[164]4
  73. 146 [139]ca(xp)[167]164
  74. 148 a[178]dc(cp):cs%[178]a[173]13:cv%[178]a[171]13[172]cs%
  75. 150 hv(xp)[178]cv%:hs(xp)[178]cs%
  76. 152 cy[178]3:cx[178]5[170]xp[172]7:cc[178]cs%[175]2
  77. 154 a$[178][202](cv$,cv%[170]1,1):[141]366
  78. 156 cy[178]4:a$[178][202](cs$,cs%[170]1,1):[141]366
  79. 158 [151]v[170]27,[194](v[170]27)[176]2[174](xp[170]1)
  80. 160 [151]v[170]40[170]xp,1:[141]316:cp[178]cp[170]1
  81. 162 tm[178]10:[141]346
  82. 164 [130]:[142]
  83. 166 [143]---face down
  84. 168 [129]z[178]0[164]4
  85. 170 [139]ca(z)[167]176
  86. 172 [151]v[170]27,[194](v[170]27)[175]255[171]2[174](z[170]1)
  87. 174 [151]v[170]40[170]z,10
  88. 176 [130]:[142]
  89. 178 [143]---shuffle
  90. 180 [129]a[178]1[164]15:[141]316:[130]
  91. 182 [129]a[178]0[164]51:z[178][181]([187](1)[172]52)
  92. 184 aa[178]dc(a):dc(a)[178]dc(z):dc(z)[178]aa
  93. 186 [130]:[142]
  94. 188 [143]---place bet
  95. 190 cy[178]10:cx[178]7:cc[178]0:a$[178]"place bet"
  96. 192 [141]366:cx[178]25
  97. 194 [139]bt[179]0[167]bt[178]0
  98. 196 [139]bt[177]mb[167]bt[178]mb
  99. 198 [139]bt[177]bl[167]bt[178]bl
  100. 200 a[178]bt:z[178]4:[141]256
  101. 202 js[178][194](j2):[139](js[175]16)[178]0[167]212
  102. 204 [139](js[175]3)[179][177]3[167]bt[178]bt[170][180](js[175]2)[171][180](js[175]1):[137]194
  103. 206 tm[178]10:[141]346
  104. 208 [141]360:[153][200](sp$,8)
  105. 210 tm[178]10:[141]346:[137]194
  106. 212 [141]326:[141]354
  107. 214 bl[178]bl[171]bt:[142]
  108. 216 [143]---hold cards
  109. 218 jx[178]0:jy[178]0
  110. 220 [151]v[170]16,32[171](jx[178]4)
  111. 222 [151]v,(sx[170]jx[172]56)[175]255
  112. 224 [151]v[170]1,sy[170]jy[172]16:tm[178]4:[141]346
  113. 226 [151]v[170]1,0:tm[178]4:[141]346
  114. 228 js[178][194](j2):[139](js[175]16)[178]0[167]242
  115. 230 [139](js[175]2)[178]0[175](jy[178]0)[167]jy[178]1:[141]336
  116. 232 [139](js[175]1)[178]0[175](jy[178]1)[167]jy[178]0:[141]336
  117. 234 [139]jy[167]jx[178]2:[137]220
  118. 236 [139](js[175]4)[178]0[175](jx[177]0)[167]jx[178]jx[171]1:[141]336
  119. 238 [139](js[175]8)[178]0[175](jx[179]4)[167]jx[178]jx[170]1:[141]336
  120. 240 [137]220
  121. 242 [139]jy[167][141]326:[142]
  122. 244 ca(jx)[178]1[171]ca(jx):a$[178][200](sp$,4):[139]ca(jx)[167]a$[178][199](152)[170]"hold"
  123. 246 cy[178]6:cx[178]4[170]jx[172]7:[141]360:[153]a$
  124. 248 [141]326:[137]220
  125. 250 [143]---print balance
  126. 252 cy[178]12:cx[178]21:z[178]6:a[178]bl
  127. 254 [143]---format number
  128. 256 z$[178][196](a)
  129. 258 a$[178][200](sp$,z[171][195](z$))[170]"$"[170][201](z$,[195](z$)[171]1)
  130. 260 cc[178]1:[141]366
  131. 262 [142]
  132. 264 [143]---evaluate hand
  133. 266 sv[178]0:sr[178]0:fl[178]0:ct[178]0:pv[178]0:hv(5)[178]99
  134. 268 [129]a[178]3[164]0[169][171]1:[129]z[178]0[164]a
  135. 270 [139]hv(z)[179]hv(z[170]1)[167]aa[178]hv(z):hv(z)[178]hv(z[170]1):hv(z[170]1)[178]aa
  136. 272 [130]:[130]
  137. 274 [129]a[178]0[164]4:[129]z[178]0[164]4
  138. 276 [139]hv(z)[178]hv(a)[167]sv[178]sv[170]1
  139. 278 [130]:[130]
  140. 280 [129]a[178]0[164]4
  141. 282 ct[178]ct[170]hv(a)
  142. 284 [139]hv(a)[178]hv(a[170]1)[170]1[167]sr[178]sr[170]1
  143. 286 [139]hs(a)[178]hs(0)[167]fl[178]fl[170]1
  144. 288 [130]
  145. 290 [143]---point value
  146. 292 [139]sv[178]7[167]pv[178]1
  147. 294 [139]sv[178]9[167]pv[178]2
  148. 296 [139]sv[178]11[167]pv[178]3
  149. 298 [139](sr[178]4)[176](hv(0)[178]12[175]sr[178]3[175]ct[178]18)[167]pv[178]4
  150. 300 [139]fl[178]5[167]pv[178]5
  151. 302 [139]sv[178]13[167]pv[178]6
  152. 304 [139]sv[178]17[167]pv[178]7
  153. 306 [139]fl[179]5[167][142]
  154. 308 [139](sr[178]4)[176](hv(0)[178]12[175]sr[178]3[175]ct[178]18)[167]pv[178]8
  155. 310 [139]hv(0)[178]12[175]sr[178]4[167]pv[178]9
  156. 312 [142]
  157. 314 [143]---card sound
  158. 316 [151]s1,0:[151]s1[170]1,200
  159. 318 [151]s1[170]5,48:[151]s1[170]6,0
  160. 320 [151]s1[170]4,128:[151]s1[170]4,129
  161. 322 [142]
  162. 324 [143]---beep sound
  163. 326 [151]s2,0:[151]s2[170]1,12
  164. 328 [151]s2[170]5,8:[151]s2[170]6,240
  165. 330 [151]s2[170]4,17:tm[178]6:[141]346
  166. 332 [151]s2[170]4,16:[146]j2,16:[142]
  167. 334 [143]---cursor sound
  168. 336 [151]s1,0:[151]s1[170]1,10
  169. 338 [151]s1[170]5,2:[151]s1[170]6,0
  170. 340 [151]s1[170]4,16:[151]s1[170]4,17
  171. 342 [142]
  172. 344 [143]---delay
  173. 346 tm[178]tm[170]ti
  174. 348 [139]tm[177]ti[167]348
  175. 350 [142]
  176. 352 [143]---clear line
  177. 354 [151]214,cy[171]1:[153]:[153]sp$
  178. 356 [142]
  179. 358 [143]---plot
  180. 360 [151]214,cy[171]1:[153]:[153][163]cx);
  181. 362 [142]
  182. 364 [143]---print wide string
  183. 366 sl[178]sc[170]cy[172]40[170]cx
  184. 368 [129]a[178]1[164][195](a$)
  185. 370 z[178]([198]([202](a$,a,1))[175]63)[172]2
  186. 372 [151]sl[170]s1,cc:[151]sl[170]s1[170]1,cc
  187. 374 [151]sl,z[170]128:[151]sl[170]1,z[170]129
  188. 376 sl[178]sl[170]2
  189. 378 [130]:[142]
  190. 380 [143]---redefined characters
  191. 382 [151]53281,5:[151]53280,5
  192. 384 [153][199](8)[199](147):[151]v[170]21,0
  193. 386 cy[178]12:cx[178]14:[141]360
  194. 388 [153][199](144)"setting up..."
  195. 390 [151]56334,[194](56334)[175]254
  196. 392 [151]1,[194](1)[175]251
  197. 394 [151]781,5:[151]782,1:[151]91,212:[151]90,0:[151]89,60:[151]88,0
  198. 396 [158]41964
  199. 398 [151]1,[194](1)[176]4
  200. 400 [151]56334,[194](56334)[176]1
  201. 402 [151]53272,([194](53272)[175]240)[176]14
  202. 404 [129]a[178]0[164]15:[135]ch(a):[130]
  203. 406 n1[178]14336:n2[178]n1[170]1024:n3[178]n2[170]8
  204. 408 [129]a[178]0[164]63:[129]z[178]0[164]7
  205. 410 cn[178][194](n1[170]a[172]8[170]z):aa[178]ch((cn[175]240)[173]16):zz[178]ch(cn[175]15)
  206. 412 [151]n2[170]a[172]16[170]z,aa:[151]n3[170]a[172]16[170]z,zz
  207. 414 [130]:[130]
  208. 416 [129]a[178]0[164]79:[135]z:[151]n2[170]432[170]a,z
  209. 418 [130]
  210. 420 [143]---sprites
  211. 422 [129]a[178]832[164]959:[135]z:[151]a,z:[130]
  212. 424 [151]v[170]23,127:[151]v[170]29,127
  213. 426 [151]v[170]27,65:[151]v[170]28,127
  214. 428 [151]v[170]37,1:[151]v[170]38,0
  215. 430 [129]a[178]0[164]4:[151]v[170]40[170]a,10
  216. 432 [151]v[170]2[170]a[172]2,(sx[170]a[172]56)[175]255
  217. 434 [151]v[170]3[170]a[172]2,sy:[151]sp[170]1[170]a,13
  218. 436 [130]:[151]v[170]16,32
  219. 438 [151]v[170]12,sx[170]112:[151]v[170]13,sy[170]16
  220. 440 [151]sp[170]6,14:[151]v[170]45,0
  221. 442 [151]sp,14:[151]v[170]1,0:[151]v[170]39,7
  222. 444 [143]---screen
  223. 446 [153][199](147):[151]v[170]21,127
  224. 448 cy[178]8:cx[178]18:[14